package it.sd.pwframework.persistence.model;

import it.sd.pwframework.persistence.annotations.CrudForm;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.PrimaryKeyJoinColumn;

@Entity
@CrudForm(label="Media")
@PrimaryKeyJoinColumn(name="ID", referencedColumnName="ID")
public class Media extends Item {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@ManyToOne(fetch=FetchType.LAZY)
	private MediaType mediaType;
	
	private String title;

	public MediaType getMediaType() {
		return mediaType;
	}

	public void setMediaType(MediaType mediaType) {
		this.mediaType = mediaType;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	

}
